<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script>
      let name = "张三";

      //   模板字符串可以解析变量
      let sayHello = "${name}";
      console.log(sayHello);

      //    模板字符串中可以换行
      let result = {
        name: "张三",
        age: 20,
      };
      let html =
        "<div><span>${result.name}</span><span>${result.age}</span></div>";
      console.log(html);
    </script>
    <title>Document</title>
  </head>
  <body></body>
</html>
